package cn.sunlight.college.serviceEdu.controller;

import cn.sunlight.college.common.utils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName EduLoginController
 * @Description 管理员登录管理
 * @Author liugang
 * @Date 2021/6/12 ~ 11:24 下午
 * @Version V1.0
 */
@Api(description = "管理员登录管理")
@RestController
@RequestMapping("/serviceEdu/user")
@CrossOrigin  //解决跨域
public class EduLoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R info(){
        return R.ok().data("roles","[admin]")
                .data("name","admin")
                .data("avatar","https://guli-file-190513.oss-cn-beijing.aliyuncs.com/avatar/default.jpg");
    }

}
